﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReturnProduct_Processing.aspx.cs"
    Inherits="PeisongWeb.admin.ReturnProduct_Processing" %>

<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<%@ Register TagName="top" Src="controls/top.ascx" TagPrefix="uc1" %>
<%@ Register TagName="menu" Src="controls/menu.ascx" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>退货处理 - 想购网长期采购物流配送系统</title>
    <!--#include file="style.inc"-->

    <script type="text/javascript">
        function resetSrh() {
            document.getElementById("txt_OrderNo").value = "";
        }
        function IsNull(){
          var txtOr=document.getElementById("txt_OrderNo").value;
          if(txtOr=="")
        {
             alert("请输入订单编号");
             return false;
        }
        return true;
        }
        function txtNoteNull()
        {
        var txtOr=document.getElementById("txtNotes").value;
          if(txtOr=="")
        {
             alert("请填写退货原因");
             return false;
        }
        return true;
        }
        
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <ext:ScriptManager ID="ScriptManager1" runat="server" />
    <uc1:top ID="Top1" runat="server" />
    <uc2:menu ID="Menu1" runat="server" />
    <div id="admin-body">
        <ext:Panel ID="Panel1" runat="server" Title="退货订单编号查询" BodyStyle="padding:5px 5px 0"
            Width="960" Frame="true" ButtonAlign="Center">
            <Body>
                <ext:Panel ID="Panel5" runat="server">
                    <Body>
                        <ext:ColumnLayout ID="ColumnLayout2" runat="server">
                            <ext:LayoutColumn ColumnWidth=".5">
                                <ext:Panel ID="Panel6" runat="server" Border="false" Header="false">
                                    <Body>
                                        <div id="admin_edit_content_search">
                                            <ul>
                                                <li>
                                                    <label>
                                                        订单编号
                                                    </label>
                                                    <asp:TextBox runat="server" ID="txt_OrderNo"></asp:TextBox>
                                                </li>
                                                <li>
                                                    <label>
                                                        &nbsp;
                                                    </label>
                                                    [<asp:LinkButton ID="lbtn_Search" runat="server" Text="查 询" OnClientClick="return IsNull();"
                                                        OnClick="lbtn_Search_Click">
                                                    </asp:LinkButton>]&nbsp;&nbsp;&nbsp; [<a href="javascript:resetSrh();">重 置</a>]
                                                </li>
                                            </ul>
                                        </div>
                                    </Body>
                                </ext:Panel>
                            </ext:LayoutColumn>
                        </ext:ColumnLayout>
                    </Body>
                </ext:Panel>
            </Body>
        </ext:Panel>
        <p>
            &nbsp;</p>
        <div id="admin_list_content" runat="server" visible="false">
            <table cellpadding="0" cellspacing="0">
                <tr class="header-row">
                    <td width="5%" bgcolor="#C0D5F0" align="center">
                        序号
                    </td>
                    <td width="15%" bgcolor="#C0D5F0" align="center">
                        商品名称
                    </td>
                    <td width="10%" bgcolor="#C0D5F0" align="center">
                        商品价格
                    </td>
                    <td width="10%" bgcolor="#C0D5F0" align="center">
                        商品数量
                    </td>
                    <td width="30%" bgcolor="#C0D5F0" align="center">
                        备注
                    </td>
                    <td width="10%" bgcolor="#C0D5F0" align="center">
                        合计
                    </td>
                    <td width="12%" bgcolor="#C0D5F0" align="center">
                        操作
                    </td>
                </tr>
                <asp:Repeater runat="server" ID="rpt_OrderItems" OnItemCommand="rpt_OrderItems_ItemCommand">
                    <ItemTemplate>
                        <tr align="center" style="height: 20px;" class='<%# Container.ItemIndex%2==0? "row-alt":"alt"  %>'>
                            <td>
                                <%# Container.ItemIndex+1%>
                                <asp:HiddenField ID="hid_oiId" runat="server" Value='<%#Eval("oiid") %>' />
                            </td>
                            <td>
                                <%#Eval("proName")%>
                            </td>
                            <td>
                                ￥<%#string.Format("{0:F2}", Eval("price"))%>/<%#Eval("unit") %>
                            </td>
                            <td>
                                <%#Eval("quantity") %>
                            </td>
                            <td>
                                <%# Eval("note")%>
                            </td>
                            <td>
                                ￥<%# string.Format("{0:F2}", Convert.ToDecimal(Eval("price")) * Convert.ToDecimal(Eval("quantity")))%>
                                &nbsp;
                            </td>
                            <td>
                                <span style="<%=power>=2?"": "display:none" %>">
                                    <asp:LinkButton ID="lbt_delete" runat="server" CommandName="Del" CommandArgument='<%# string.Format("{0},{1}",Eval("oiid"),Eval("quantity"))%>'
                                        Text="退货" OnClientClick="javascript:return confirm('你确定执行此操作吗?')" CausesValidation="false">
                                    </asp:LinkButton>
                                </span>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
        </div>
    </div>
    <ext:Window ID="win_Deduct" runat="server" Title="退货原因" Height="350px" Width="550px"
        BodyStyle="padding: 6px; background-color: #fff;" AutoScroll="true" Modal="True"
        Resizable="false" ShowOnLoad="false" Draggable="true" Icon="ApplicationViewGallery">
        <Body>
            <div style="width: 100%">
                <p style="height: 30px; line-height: 30px; padding-left: 20px;">
                    请在此处认真填写退货的原因，以备存档。</p>
                <ul>
                    <li style="float: left; width: 20%; text-align: center;">产品数量：</li>
                    <li style="float: left; width: 78%;">
                        <asp:TextBox ID="txtQuantity" runat="server" Width="60px"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtQuantity"
                            Display="Dynamic" ErrorMessage="请输入正确的退货数量" ValidationExpression="\d{1,10}\.*\d{0,2}"></asp:RegularExpressionValidator>
                    </li>
                    <li style="float: left; width: 20%; text-align: center;">退货原因： </li>
                    <li style="float: left; width: 78%;">
                        <asp:TextBox ID="txtNotes" runat="server" TextMode="MultiLine" Width="100%" Height="200"></asp:TextBox><br />
                    </li>
                </ul>
                <p style="padding-left: 100px; height: 40px; line-height: 35px;">
                    <asp:Button ID="Button1" runat="server" Text="确认退货" OnClientClick="return txtNoteNull();"
                        OnClick="Button1_Click" /></p>
            </div>
        </Body>
    </ext:Window>
    <input type="hidden" id="hdoiid" runat="server" />
    <input type="hidden" id="hdquantity" runat="server" />
    </form>
</body>
</html>
